home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / CMultStdPopupPane 2.0 / For TCL 1.1.2⁄earlier / CMultStdPopupPane.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  1.7 KB  |  63 lines  |  [TEXT/KAHL]

  1. /******************************************************************************
  2.  CMultStdPopupPane.h
  3.  
  4.         Interface for the CMultStdPopupPane Class
  5.         
  6.         Copyright © 1993 Michael Abramowicz. All rights reserved.
  7.  
  8.  ******************************************************************************/
  9.  
  10. #define _H_CMultStdPopupPane
  11.  
  12. #include "CStdPopupPane.h"
  13.  
  14. #define kDisabledMenuID        5368        /* Menu id to use for disabled menus */
  15.                                         /* Do not use this id for other menus */
  16. #define kTemporaryMenuID    5369        /* Menu ID to give menu a temporarily */
  17.                                         /* unique name. Don’t use this either */
  18.  
  19. #define kIncludeMenuTitle        TRUE
  20. #define kDontIncludeMenuTitle    FALSE
  21.  
  22. class CMultStdPopupPane : public CStdPopupPane
  23. {
  24. public:
  25.  
  26.     Boolean    doInvertTitle;
  27.     short itsPseudoMenuID;
  28.  
  29.     void IMultStdPopupPane( short menuID, short pseudoMenuID, Boolean includeTitle,
  30.                 CView *anEnclosure, CBureaucrat *aSupervisor, short aWidth, 
  31.                 short aHeight, short aHEncl, short aVEncl);
  32.     virtual void IViewTemp( CView *anEnclosure, CBureaucrat *aSupervisor,
  33.                             Ptr    viewData);
  34.                             
  35.     virtual void Activate( void);
  36.     virtual void Deactivate( void);
  37.     
  38.     virtual void Dispose( void);
  39.  
  40.     virtual void InvertTitle( void);
  41.         
  42. protected:
  43.  
  44.     MenuHandle        itsMacMenu;        // handle to menu (detached from resource fork)
  45.     
  46.         /* Internal methods */
  47.     void IMultStdPopupPaneX( short menuID, short pseudoMenuID);
  48.     void ChangeMenuID(short index, short newID);
  49.     short FindItsMenuIndex(void);
  50.     void Disable(void);
  51.     void Enable(void);
  52.  
  53. };
  54.  
  55. typedef struct        /* CMultStdPopupPane template */
  56. {
  57.     StdPopupTemp    stdPopupTemp;
  58.     short            pseudoMenuID;        // menu id to use in run-time
  59.     Boolean         titlesVisible;        // titles should be visible
  60.     
  61. } MultStdPopupTemp, *MultStdPopupTempP;
  62.  
  63.